<template>
  <div>
    <div>
      <el-menu
        default-active="2"
        class="el-menu-vertical-demo"
        text-color="#666"
        @select="handleSelect"
        router
      >
        <el-menu-item index="/user/allfile">
          <i class="el-icon-document-copy"></i>
          <span slot="title">全部文件</span>
        </el-menu-item>
        <el-menu-item index="2">
          <span slot="title">图片</span>
        </el-menu-item>
        <el-menu-item index="3">
          <span slot="title">文档</span>
        </el-menu-item>
        <el-menu-item index="4">
          <span slot="title">视频</span>
        </el-menu-item>
        <el-menu-item index="5">
          <span slot="title">其他</span>
        </el-menu-item>
        <el-menu-item index="/user/share">
          <i class="el-icon-share"></i>
          <span slot="title">我的分享</span>
        </el-menu-item>
        <el-menu-item index="/user/bin">
          <i class="el-icon-delete"></i>
          <span slot="title">回收站</span>
        </el-menu-item>
      </el-menu>
    </div>
  </div>
</template>

<script>
export default {
  data() {},
  methods: {
    handleSelect(index) {
      this.$nextTick(() => {
        console.log(this.$route.path);
      });
    },
  },
};
</script>
<style>
.el-menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
}
</style>